package com.example.demo.controller;

import com.example.demo.model.Customer;
import com.example.demo.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 类注释
 *
 * @author yangzhengrong
 * @version 1.0.0 createTime: 2017/11/21 15:31
 */
@RestController
@RequestMapping("/customer")
public class CustomerController {
    @Autowired
    private CustomerService customerService;

    @PostMapping("/queryAllCustomer")
    public List<Customer> queryAllCustomer(){
        return customerService.queryAllCustomer();
    }
}
